Skip to content

mini optimizations for jbwapi - #99

Merged
JasperGeurtz merged 1 commit into
developfrom
map-micro-optimize
Nov 5, 2026
Merged

JasperGeurtz merged 1 commit into
developfrom
map-micro-optimize

Conversation

@JasperGeurtz

Copy link
Copy Markdown
Collaborator

micro optimize map lookups avoiding redundant lookups

  • don't check containsKey but use computeIfAbsent
  • don't check containsKey but check get returning null.

Use a more appropriate hashcode for ID-based objects.

  • Objects.hash takes variadic args and builds an array under the hood. The JVM may have eliminated that but not sure so why not use a more appropriate Integer.hashCode directly.

#98

@JasperGeurtz
JasperGeurtz force-pushed the map-micro-optimize branch 4 times, most recently from da6eb3c to 4bba68c Compare October 31, 2026 09:05
@JasperGeurtz
JasperGeurtz requested a review from dgant October 31, 2026 09:06
@JasperGeurtz
JasperGeurtz merged commit 484be45 into develop Nov 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant